package day05;
import java.util.Arrays;
import java.util.Scanner;
public class HomeWork {
    public static void main(String[] args) {
        /*Scanner scan=new Scanner(System.in);
        int score=0;
        for (int a=1;a<=10;a++){
            int c=(int)(Math.random()*100+1);
            int b=(int)(Math.random()*100+1);
            System.out.println(a+")\t"+c+"+"+b+"="+"?");
            System.out.println("请作答");
            int result=scan.nextInt();
            if (result==a+b) {
                System.out.println("ture");
                score+=10;
            }else {
                System.out.println("false");
            }
        }
        System.out.println("总分为:"+score);

         */


       /* for (int num=1;num<=9;num++){
            for (int i=1;i<=num;i++){
                System.out.print(i+"*"+num+"="+i*num+"\t");
            }
            System.out.println();
        }

        */
        /*int[]ufo=new int[7];
       for (int i=0;i< ufo.length;i++){
           ufo[i]=(int)(Math.random()*100+1);
           System.out.println(ufo[i]);
       }
       int max=ufo[0];
       for (int i=1;i< ufo.length;i++){
           if (max<ufo[i]){
               max=ufo[i];
           }
       }
        System.out.println("最大值为："+max);

         */
/*int []ufo=new int[5];
        for (int i=0;i< ufo.length;i++) {
            ufo[i] = (int) (Math.random() * 100);
            System.out.println(ufo[i]);
        }
            Arrays.sort(ufo);
            System.out.println("排序后：");

    for (int i=0;i< ufo.length;i++){
            System.out.println(ufo[i]);
        }



        for (int i= ufo.length-1;i>0;i--){
            System.out.println(ufo[i]);
        }

         */



       /* Scanner scan=new Scanner(System.in);
        int score=0;
        for (int i=1;i<=10;i++){
            int a=(int) (Math.random()*100+1);
            int b=(int) (Math.random()*100+1);
            System.out.println(i+")\t"+a+"+"+b+"="+"?");
            System.out.println("请作答：");
            int answer=scan.nextInt();
            if (answer==a+b){
                score +=10;
                System.out.println("ture");
            }else {
                System.out.println("fasle");
            }
        }
        System.out.println("你的总分为："+score);
        */



       /* for (int a=1;a<=9;a++){
            for (int i=1;i<=a;i++ ){
                System.out.print(i+"*"+a+"="+i*a+"\t");
            }
            System.out.println();
        }

        */




        /*int []kun=new int[8];
        int []kun2=new int[]{5,6,7};
        int []kun3={2,2,2};
        System.out.println(kun[0]);

         */


        /*int []kun=new int[7];
        for (int i=0;i< kun.length;i++ ){
            kun[i]=(int)(Math.random()*100+1);
            System.out.println(kun[i]);
        }
        int max=kun[0];
        for (int i=1;i< kun.length;i++){
            if (max<kun[i]){
                max=kun[i];
            }

        }
        System.out.println("最大值为：" +max);
}
         */




        /*int []ufo=new int[5];
        for (int i=0;i< ufo.length;i++) {
            ufo[i] = (int) (Math.random() * 100);
            System.out.println(ufo[i]);
        }
            Arrays.sort(ufo);
            System.out.println("排序后：");

    for (int i=0;i< ufo.length;i++){
            System.out.println(ufo[i]);
        }



        for (int i= ufo.length-1;i>0;i--){
            System.out.println(ufo[i]);
        }

         */

        }

}
